package com.bj58.mis.apm.collector.http;

import com.bj58.mis.apm.client.core.BaseCollectLog;

/**
 * @author: zhangfx
 * @create: 2018-06-12 14:32
 **/
public class HttpAccessStatistic extends BaseCollectLog {

    private String requestPath;

    private String requestMethod;

    private long requestTime;

    private int responseStatus;

    private int maxTimeTaken;
    private int minTimeTaken;
    private int avgTimeTaken;
    private int requestCount;
    private int totalTimeTaken;

    private boolean statistic;

    @Override
    public String getCollectType() {
        return "httpStatistic";
    }

    public String getRequestPath() {
        return requestPath;
    }

    public void setRequestPath(String requestPath) {
        this.requestPath = requestPath;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public long getRequestTime() {
        return requestTime;
    }

    public void setRequestTime(long requestTime) {
        this.requestTime = requestTime;
    }

    public int getResponseStatus() {
        return responseStatus;
    }

    public void setResponseStatus(int responseStatus) {
        this.responseStatus = responseStatus;
    }

    public int getMaxTimeTaken() {
        return maxTimeTaken;
    }

    public void setMaxTimeTaken(int maxTimeTaken) {
        this.maxTimeTaken = maxTimeTaken;
    }

    public int getMinTimeTaken() {
        return minTimeTaken;
    }

    public void setMinTimeTaken(int minTimeTaken) {
        this.minTimeTaken = minTimeTaken;
    }

    public int getAvgTimeTaken() {
        return avgTimeTaken;
    }

    public void setAvgTimeTaken(int avgTimeTaken) {
        this.avgTimeTaken = avgTimeTaken;
    }

    public int getRequestCount() {
        return requestCount;
    }

    public void setRequestCount(int requestCount) {
        this.requestCount = requestCount;
    }

    public int getTotalTimeTaken() {
        return totalTimeTaken;
    }

    public void setTotalTimeTaken(int totalTimeTaken) {
        this.totalTimeTaken = totalTimeTaken;
    }

    public boolean isStatistic() {
        return statistic;
    }

    public void setStatistic(boolean statistic) {
        this.statistic = statistic;
    }

    @Override
    public String toString() {
        return "HttpAccessStatistic{" +
                "requestPath='" + requestPath + '\'' +
                ", requestMethod='" + requestMethod + '\'' +
                ", requestTime=" + requestTime +
                ", responseStatus=" + responseStatus +
                ", maxTimeTaken=" + maxTimeTaken +
                ", minTimeTaken=" + minTimeTaken +
                ", avgTimeTaken=" + avgTimeTaken +
                ", requestCount=" + requestCount +
                ", totalTimeTaken=" + totalTimeTaken +
                ", statistic=" + statistic +
                '}';
    }
}
